package com.apkicon.model;

import com.apkicon.parser.AndroidManifestParser;
import com.apkicon.parser.IconResource;
import java.io.File;

/**
 * APK信息模型
 */
public class ApkInfo {
    private final File apkFile;
    private final IconResource iconResource;
    private final AndroidManifestParser.AppIconInfo appIconInfo;
    
    public ApkInfo(File apkFile, IconResource iconResource, AndroidManifestParser.AppIconInfo appIconInfo) {
        this.apkFile = apkFile;
        this.iconResource = iconResource;
        this.appIconInfo = appIconInfo;
    }
    
    public File getApkFile() {
        return apkFile;
    }
    
    public IconResource getIconResource() {
        return iconResource;
    }
    
    public AndroidManifestParser.AppIconInfo getAppIconInfo() {
        return appIconInfo;
    }
    
    /**
     * 获取图标资源路径
     */
    public String getIconPath() {
        return iconResource.getPath();
    }
    
    /**
     * 获取图标类型
     */
    public String getIconType() {
        return iconResource.getType();
    }
    
    /**
     * 获取图标尺寸
     */
    public int getIconSize() {
        return iconResource.getSize();
    }
    
    /**
     * 获取图标密度
     */
    public String getIconDensity() {
        return iconResource.getDensity();
    }
    
    /**
     * 是否有Adaptive Icon
     */
    public boolean hasAdaptiveIcon() {
        return appIconInfo.hasAdaptiveIcon();
    }
    
    /**
     * 获取应用图标引用
     */
    public String getIconReference() {
        return appIconInfo.getIconRef();
    }
}
